Conservative Overloading in Higher-Order Logic
نویسنده
چکیده
Overloading in the context of higher-order logic has been used for some time now. Isabelle is the only proof-assistant that actually implements overloading within the logic instead of merely instrumenting the pretty-printing machinery on top of the logic. So far there existed no satisfying theory that could explain why it is safe to add a mechanism of certain kinds of possibly overloaded constant definitions to ordinary higher-order logic. This is not only of theoretical interest but also of practical importance; until now it was easy to introduce inconsistencies in Isabelle by abusing overloaded definitions. This paper addresses both the theoretical and the practical aspects of adding overloading to higher-order logic. We first define what we mean by Higher-Order Logic with Conservative Overloading (HOLCO). HOLCO captures how overloading is actually applied by the users of Isabelle; for example it allows to freely mix type definitions with overloaded constant definitions. We then show the consistency of HOLCO by reducing it to ordinary higher-order logic with only type definitions and no constant definitions. Having so established our playground we show that this playground is too big for any proof-assistant implementing HOLCO; checking if definitions obey the rules of HOLCO is not even semi-decidable. We prove this by connecting this problem with the problem of deciding the termination of certain kinds of term rewriting systems (TRSs) which we call overloading TRSs and showing that Post’s Correspondence Problem for Prefix Morphisms can be reduced to it. The undecidability proof reveals strong ties between our problem and the dependency pair method by Arts and Giesl for proving termination of TRSs. The dependency graph of overloaded TRSs can be computed exactly (for general TRSs it is not computable and must be approximated). We exploit this by providing an algorithm that checks the conservativity of definitions based on the dependency pair method and a restricted form of linear polynomial interpretation; the algorithm also uses the strategy of Hirokawa and Middeldorp of recursively calculating the strongly connected components of the dependency graph. Of course the algorithm cannot successfully check all valid conservative definitions; but it is sufficiently powerful to deal with all overloaded definitions that the author has encountered so far in practice. An implementation of this algorithm is available as part of a package that adds conservative overloading to Isabelle. This package also allows to delegate the conservativity check to external tools like the Tyrolean Termination Tool or the Automated Program Verification Environment. ∗ Supported by the Ph.D. program “Logik in der Informatik” of the “Deutsche Forschungsgemeinschaft.” overloading.tex; 8/01/2006; 16:29; p.1
منابع مشابه
Type Classes and Overloading in Higher-Order Logic
Type classes and overloading are shown to be independent concepts that can both be added to simple higher-order logics in the tradition of Church and Gordon, without demanding more logical expressiveness. In particular, model-theoretic issues are not affected. Our metalogical results may serve as a foundation of systems like Isabelle/Pure that offer the user Haskell-style order-sorted polymorph...
متن کاملA Combinator-based Order-sorted Higher-order Uniication Algorithm
This paper develops a sound and complete transformation-based algorithm for uniication in an extensional order-sorted combinatory logic supporting constant overloading and a higher-order sort concept. Appropriate notions of order-sorted weak equality and extensionality | reeecting order-sorted-equality in the corresponding lambda calculus given by Johann and Kohlhase | are deened, and the typed...
متن کاملHigher Order Functions Considered Unnecessary for Higher Order Programming
It is often claimed that the essence of functional programming is the use of functions as values, i.e., of higher order functions, and many interesting examples have been given showing the power of this approach. Unfortunately, the logic of higher order functions is diicult, and in particular, higher order uniication is undecidable. Moreover (and closely related), higher order expressions are n...
متن کاملOn Mints' Reduction for ccc-Calculus
A formalization of the strong normalization proof for system F in LEGO p. 13 Partial intersection type assignment in applicative term rewriting systems p. 29 Extracting constructive content from classical logic via control-like reductions p. 45 Combining first and higher order rewrite systems with type assignment systems p. 60 A term calculus for intuitionistic linear logic p. 75 Program extrac...
متن کاملStatic semantic analysis and theorem proving for CASL
This paper presents a static semantic analysis for CASL, the Common Algebraic Speciication Language. Abstract syntax trees are generated including subsorts and overloaded functions and predicates. The static semantic analysis, through the implementation of an overload resolution algorithm, checks and qualiies these abstract syntax trees. The result is a fully qualiied CASL abstract syntax tree ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006